<template>
	<div class="about_us">
    <img :src="state.img" width="100%" alt="">
    <p style="color: grey;text-align: center;margin-top: 50px;">长按保存图片</p>
	</div>
</template>

<script setup lang="ts">
import { reactive, onMounted } from 'vue';
import { getUserPoster } from '@/api/common';
import {useRoute, useRouter} from "vue-router";
import {useMainStore} from "@/store";
const route = useRoute();
const router = useRouter();
const mainStore = useMainStore();
const state = reactive({
  type:route.query.type||1,
	img: ''
});

onMounted(() => {
  getUserPosterMethod();
});

const getUserPosterMethod = async () => {
	const res = await getUserPoster(mainStore.user_id);
  const {poster_img_url,poster_qrcode_url} = res.data
	if (state.type == 1) {
    state.img = poster_img_url;
  } else {
    state.img = poster_qrcode_url;
  }
};
</script>

<style lang="scss" scoped>
.about_us {
	padding: 15px;
	:deep(img) {
		width: 100%;
		height: 100%;
		border-radius: 3px;
	}
	:deep(p) {
		color: #52545d;
		font-size: 14px;
		line-height: 24px;
	}
}
</style>
